package edu.cicese.ans;

import com.jsurf.InterestPoint;
import java.util.List;
import java.io.Serializable;
import java.util.Map;

public class Match implements Comparable<Match>, Serializable{
	private static final long serialVersionUID = 1;
	
	public int quantity;
	public String filename, spaceID;
	public List<InterestPoint> points;
	public int ocurrences;
	public Map<InterestPoint, InterestPoint> matches;
	
	public Match(Map<InterestPoint, InterestPoint> matches, String filename, String spaceID) {
		this.matches = matches;
		this.filename = filename;
		this.spaceID = spaceID;
		quantity = matches.size();
	}

	public Match(int quantity, String spaceID) {
		this.quantity = quantity;
		this.spaceID = spaceID;
	}
	
	public Match(int quantity, String filename, String spaceID) {
		this.quantity = quantity;
		this.filename = filename;
		this.spaceID = spaceID;
	}
	
	public Match(int quantity, int ocurrences, String spaceID) {
		this.quantity = quantity;
		this.ocurrences = ocurrences;
		this.spaceID = spaceID;
	}
	
	public Match(int quantity, String filename, List<InterestPoint> points) {
		this.quantity = quantity;
		this.filename = filename;
		this.points = points;
	}
	
	public int compareTo(Match m) {
		return m.quantity - this.quantity;
	}
}